/**
 * 品牌
 * 文件命名格式：zmn.模块名称.表名称.功能.jas
 * @author duanzucai
 * @since 2018/11/10
 */
layui.define(['index', 'form', 'table', 'laypage', 'layedit', 'laydate','jquery'], function (exports) {
    var $ = layui.$;
    var table = layui.table;
    var laypage = layui.laypage;
    var laydate = layui.laydate;
    var form = layui.form;
    zmnLayUtil.layFormVerify(form);
    table.init('zmn-table', {
        toolbar: "#zmn-table-tool",
        page: true,
        limit: json.pageSize,
        height: 'full-140',
        defaultToolbar: []
    });
    table.on('tool(zmn-table)', function(obj){
        if(obj.event === 'delete'){
            let groupId = obj.data.groupId;
            layer.confirm('确认删除该城市分组吗？', {
                btn: ['确定', '取消']
            }, function () {
                zmnPage.ajaxSimple("/service/tariff/citygroup/deleteGroup.action?groupId="+groupId, {}, 1000);
            });
            return false;
        }
    });

    laypage.render(layui.$.extend({limits:[10, 20, 30, 40, 50,100]},zmnPage.laypageOptions(json)));
    //对外暴露的接口
    exports('serv_service_tariff_citygroup_list', {});
});